<div id="app-container" class="container" myapp="STORE_WECHAT_INFOS_EDIT">
  <div class="">
    <%= search_form_for @q, url: ruiqu_business_companies_path, class: 'form-inline' do |f|%>
      <div class="form-group">
        <input type="text" value="<%= @search_params%>" name="q[phone_number_or_company_name_or_user_name_or_address_cont]" class="form-control input"  placeholder="请输入姓名或手机号或地址或公司名">
      </div>
      <button type="submit" class="btn btn-default btn btn-success">查询</button>
      <%= link_to '新建备忘', new_ruiqu_business_company_path, class: 'btn btn-default btn-info btn', style: 'float:right', role: 'button' %>
      <a class="btn btn-default btn-warning btn" href="/ruiqu/business_companies/lead_in" role="button" style="float:right;margin-right:20px;">导入</a>
      <!-- <%= link_to "导出CSV", ruiqu_business_companies_path(format: "csv"), class: 'btn btn-default btn-warning btn-lg', role: 'button', style: "float:right;margin-right:20px;" %> -->
      <%= link_to "导出Excel", ruiqu_business_companies_path(format: "xls"), class: 'btn btn-default btn-warning btn', role: 'button', style: "float:right;margin-right:20px;" %>
    <% end %>

  </div>

  <div class="app">
     <div class="app-inner clearfix">
      <div class="widget-list-filter">
        <!-- <%= link_to "添加产品类别", new_ruiqu_store_product_category_path, class: 'ui-btn ui-btn-success' %> -->
        <p class="help-block error-message flash-notice" style=""> <%= notice %></p>
      </div>
         <table id="wechat_table" class="ui-table ui-table-list">
          <thead>
              <tr>
                <th>#</th>
                <th>公司名称</th>
                <th>联系人</th>
                <th>联系电话</th>
                <th>地址</th>
                <th></th>
                <th>操作</th>
                <th></th>
              </tr>
          </thead>
          <tbody>
              <% @companies.each_with_index do |company, i| %>
                <tr>
                  <td>
                    <%= i + 1 %>
                  </td>
                  <td> <%= link_to company.company_name, ruiqu_business_company_path(company), class: 'no-color' %></td>
                  <td> <%= company.user_name %></td>
                  <td> <%= company.phone_number %></td>
                  <td> <%= company.address %></td>
                  <td> <%= link_to '详情', ruiqu_business_company_path(company) %></td>
                  <td> <%= link_to '修改', edit_ruiqu_business_company_path(company) %></td>
                  <td><%= link_to '删除', ruiqu_business_company_path(company), data: {method: :delete}%></td>
                </tr>
              <% end %>
          </tbody>
        </table>
      </div>
  </div>

</div>
